for i in range(1, 101):
    if i % 3 == 0 or i%7 ==0:
        print(i, end="\t")